package cn.ccew.apk.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import cn.ccew.common.base.model.BaseEntity;

@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table(name = "apk_version")
public class Version extends BaseEntity {
	/**
	 * 软件名称
	 */
	private String softName;
	/**
	 * 软件Id
	 */
	private String softId;
	/**
	 * APK名称版本名称标识
	 */
	private String vname;
	/**
	 * 版本状态 0 未启用 1启用
	 */
	private int vstate;
	@Transient
	private String vstateString;
	/**
	 * 版本号
	 */
	private String vnum;
	/**
	 * 版本信息
	 */
	@Column(columnDefinition = " TEXT ")
	private String vinfo;
	/**
	 * 文件路径
	 */
	private String vpath;
	/**
	 * 文件大小
	 */
	private String vsize;
	/**
	 * 图片路径
	 */
	private String vimagepath;
	/**
	 * 下载数量
	 */
	private int vdowloadCount;

	public String getVsize() {
		return vsize;
	}

	public void setVsize(String vsize) {
		this.vsize = vsize;
	}

	public String getVimagepath() {
		return vimagepath;
	}

	public void setVimagepath(String vimagepath) {
		this.vimagepath = vimagepath;
	}

	public String getSoftId() {
		return softId;
	}

	public void setSoftId(String softId) {
		this.softId = softId;
	}

	public String getVstateString() {
		switch (vstate) {
		case 0:
			vstateString = "未启用";
			break;
		case 1:
			vstateString = "启用";
			break;
		default:
			break;
		}
		return vstateString;
	}

	public void setVstateString(String vstateString) {
		this.vstateString = vstateString;
	}

	public String getSoftName() {
		return softName;
	}

	public void setSoftName(String softName) {
		this.softName = softName;
	}

	public String getVname() {
		return vname;
	}

	public void setVname(String vname) {
		this.vname = vname;
	}

	public int getVstate() {
		return vstate;
	}

	public void setVstate(int vstate) {
		this.vstate = vstate;
	}

	public String getVnum() {
		return vnum;
	}

	public void setVnum(String vnum) {
		this.vnum = vnum;
	}

	public String getVinfo() {
		return vinfo;
	}

	public void setVinfo(String vinfo) {
		this.vinfo = vinfo;
	}

	public int getVdowloadCount() {
		return vdowloadCount;
	}

	public void setVdowloadCount(int vdowloadCount) {
		this.vdowloadCount = vdowloadCount;
	}

	public String getVpath() {
		return vpath;
	}

	public void setVpath(String vpath) {
		this.vpath = vpath;
	}

}
